home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-12-03 | 889 b | 30 lines | [TEXT/MPS ] |
- # Quit•ToolServer
- #
- # Copyright Apple Computer, Inc. 1991
- # All Rights Reserved.
- #
- # This is a sample Quit script for the MPW Shell. It helps manage
- # the shell's relationship with ToolServer. It should be used in
- # conjunction with the UserStartup•ToolServer script.
- #
- # The following if statement checks that no RShell requests
- # are pending before exiting the shell. The -status option will
- # return no output when no requests are pending. We use ``...``
- # to insure that quotes within the output of the rshell command
- # are escaped properly.
-
- If "``rshell -status``"
- set exit 0
- confirm "You have RShell requests that have not yet completed. Really Quit?" -t
- If {status} != 0
- exit "-9"
- End
- set exit 1
- End
-
- # The following will send a quit to the ToolServer if it's running locally.
-
- If {ToolServerStarted} && "{WhichToolServer}" == "-b"
- RShell {WhichToolServer} -q
- End
-